import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        
        // 读取记录的数量
        int n = scanner.nextInt();
        scanner.nextLine(); // 消耗掉换行符
        
        // 用于存储所有学生的编程语言集合
        List<Set<String>> languageSets = new ArrayList<>();
        
        // 读取每个学生的记录
        for (int i = 0; i < n; i++) {
            String line = scanner.nextLine();
            String[] parts = line.split(":");
            String[] languages = parts[1].trim().split(" ");
            
            // 将当前学生的编程语言存入集合
            Set<String> languageSet = new HashSet<>(Arrays.asList(languages));
            languageSets.add(languageSet);
        }
        
        // 找出所有集合的交集
        Set<String> commonLanguages = new HashSet<>(languageSets.get(0));
        for (int i = 1; i < languageSets.size(); i++) {
            commonLanguages.retainAll(languageSets.get(i));
        }
        
        // 输出结果
        if (commonLanguages.isEmpty()) {
            System.out.println("none");
        } else {
            for (String language : commonLanguages) {
                System.out.println(language);
            }
        }
        
        scanner.close();
    }